package com.fanshuai.netty;

import io.netty.channel.Channel;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ChannelManager {
    public static Map<String, Channel> channelMap = new ConcurrentHashMap<>();

    public static void addChannel(String uid, Channel channel) {
        channelMap.put(uid,  channel);
    }

    public static void delChannel(String uid) {
        channelMap.remove(uid);
    }

    public static Map<String, Channel> getChannels() {
        return channelMap;
    }
}
